-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate some Pool methods related to groups and fix array shapes #6659
Conversation
Pedantic is fine IMO |
@@ -136,9 +153,6 @@ public function __construct( | |||
$this->propertyAccessor = $propertyAccessor; | |||
} | |||
|
|||
/** | |||
* @return array<string, array<string, AdminInterface>> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you remove the docs here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Psalm was failing and I'll check later today, but looks like this method does not work, even throws an error, I was going to check to deprecate it.
Based on this structure:
this method would try to to get and admin with id label
, label_catalogue
, icon
, etc, that's why I guess it is not being used, but I haven't checked yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we deprecate getGroups
, I think we can deprecate hasGroup
4987c52
to
255b033
Compare
This function does not work and it throws a RuntimeError because the internal the array property adminGroups changed some time ago its content, but this function was not updated.
255b033
to
afde2f4
Compare
So I've looked for uses of About the |
dbfd5b9
to
af44c9f
Compare
If they are not used, we should deprecate them. Less code is better. |
They were added in sonata-project#1465, but they have never been used in our code.
Thanks @franmomu |
I was trying to manual merge
3.x
, but phpstan failed because the array specified inGroupExtension
is different fromSonataAdminBundle/src/Admin/Pool.php
Lines 108 to 111 in 8c0d58a
So I added more specific info.
Not sure if should bepedantic
or if I should add a changelog.While doing this I found that#6659 (comment)Pool::getGroups()
method maybe it's not used because the code doesn't make sense with the current groups.Pool::getGroups()
is used.I am targeting this branch, because this is BC.
Changelog